<?php
class FrontendNavigationForm extends Zend_Form {
    public function __construct($options = null) 
    {
        parent::__construct($options);
        
        $baseurl 	= new MHDEV_View_Helper_BaseUrl();
        $translate	= Zend_Registry::get('lang');
        
        $this->setName('fe_navi');

		// Name
		$name = new Zend_Form_Element_Text('title');
		$name->setLabel($translate->_('navi_backend_title'));
		$name->setRequired(true);
		$name->addValidator('NotEmpty');
		$name->setErrorMessages(array(
			0 => $translate->_('navi_backend_etitle')
		));
        
		// Controller
		$controller = new Zend_Form_Element_Text('controller');
		$controller->setLabel($translate->_('navi_backend_controller'));
		$controller->setRequired(false);
        
		// Action
		$action = new Zend_Form_Element_Text('action');
		$action->setLabel($translate->_('navi_backend_action'));
		$action->setRequired(false);
        
		// Role
		$role = new Zend_Form_Element_Text('role');
		$role->setLabel($translate->_('navi_backend_role'));
		$role->setDescription($translate->_('navi_backend_drole'));
		$role->setRequired(false);

		// Sort ID
		$sort = new Zend_Form_Element_Text('sort_id');
		$sort->setLabel($translate->_('navi_backend_sort'));
		$sort->setRequired(false);
        
		// Submit
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel($translate->_('form_submit'));
        
        $this->addElements(array($name, $controller, $action, $role, $sort, $submit));
    }
}  
?>